package com.yunfeisoft.business.service.impl;

import com.applet.base.BaseServiceImpl;
import com.yunfeisoft.business.dao.inter.SmsCouponHistoryDao;
import com.yunfeisoft.business.model.SmsCouponHistory;
import com.yunfeisoft.business.service.inter.SmsCouponHistoryService;
import com.applet.sql.separation.DataSourceChange;
import com.applet.utils.Page;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * ClassName: SmsCouponHistoryServiceImpl
 * Description: 优惠券使用、领取历史表service实现
 * Author: Jackie liu
 * Date: 2020-06-02
 */
@Service("smsCouponHistoryService")
public class SmsCouponHistoryServiceImpl extends BaseServiceImpl<SmsCouponHistory, String, SmsCouponHistoryDao> implements SmsCouponHistoryService {

    @Override
    @DataSourceChange(slave = true)
    public Page<SmsCouponHistory> queryPage(Map<String, Object> params) {
        return getDao().queryPage(params);
    }

    @Override
    public List<SmsCouponHistory> queryByCouponId(String couponId) {
        return getDao().queryByCouponId(couponId);
    }
}